package cn.com.blueInfo.bpm.system.convert;

import cn.com.blueInfo.bpm.common.convert.BaseConvert;
import cn.com.blueInfo.bpm.system.entity.Application;
import cn.com.blueInfo.bpm.system.request.ApplicationDTO;
import cn.com.blueInfo.bpm.system.response.ApplicationVO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

/**
 * 租户系统表 对象转换
 * @author suxch
 * @since 2025-08-31 16:20:55
 */
@Mapper(componentModel = "spring")
public interface ApplicationConvert
        extends BaseConvert<Application, ApplicationDTO, ApplicationVO> {

    Application dtoToEntity(ApplicationDTO dto);

    Application dtoToEntity(ApplicationDTO.UpdatePartialDTO dto);

    @Mapping(source = "status", target = "status", qualifiedByName = "enumToDesc")
    @Mapping(source = "deleted", target = "deleted", qualifiedByName = "enumToDesc")
    ApplicationVO entityToVO(Application entity);

}